import processing.opengl.*;

void setup() 
{
  size(640, 480, OPENGL);  // OPENGL
  smooth();
  background(#E8DDCB);
  noLoop();
}

int st = 40;  // stretch
int sz = 40;  // size
int sol2[][] = { {0, 0, 0}, {1, 0, 0}, {2, 0, 0}, {2, 0, 1}, {3, 0, 1}, {3, 0, 0}, {3, 0, -1}, {3, 1, -1}, {4, 1, -1}, {5, 1, -1}, {5, 1, 0}, {6, 1, 0}, {6, 1, -1}, {6, 1, -2}, {7, 1, -2}, {8, 1, -2}, {8, 2, -2}, {9, 2, -2}, {9, 2, -3}, {10, 2, -3}, {11, 2, -3}, {11, 1, -3}, {11, 0, -3}, {12, 0, -3}, {13, 0, -3}, {13, 0, -4}, {13, 0, -5} };

void draw() {

  rotateX(-PI/4.0);
  rotateY(PI/15.0);
  translate(25,200,0);

  fill(#CDB380);
  lights();
  stroke(#033649);
  strokeWeight(1);
  for( int i=0; i<27; i++ ) {
    pushMatrix();
    translate(sol2[i][0]*st, sol2[i][1]*st, -sol2[i][2]*st);
    box(sz); 
    popMatrix();
  }

  noFill();
  stroke(#036564);
  strokeWeight(6);
  beginShape();
  for( int i=0; i<27; i++ ) {
    vertex(sol2[i][0]*st, sol2[i][1]*st+st*6, -sol2[i][2]*st);
  }
  endShape();

  save("cube_box.png");
}
